function So_meters = Long2ECI_State(t,long,UTC)
mu = 398600.4418;

t = t / 3600 / 24;
%[solar days]Converts all times from seconds to solar days.

Tu = JulianDate(UTC) - 2451545 + t;
%[solar days]Solar days between the initial universal time and January 1, 2000 at noon.

ERA = 2 * pi * (0.7790572732640 + 1.00273781191135448 * Tu);
%[rad]Earth rotation angles for all simulation times.

EciToEcef = [cos(ERA), sin(ERA), 0; -sin(ERA), cos(ERA), 0; 0, 0, 1];
%[]Current matrix that transforms vectors from ECI coordinates to ECEF coordinates.

T = 86164.1;
r = (mu*(T/(2*pi))^2)^(1/3);

x = r*cosd(long);
y = r*sind(long);
z = 0;

R_ECEF = [x;y;z];
R_ECI = EciToEcef'*R_ECEF;

speed = sqrt(mu/r);
V_ECI = speed*cross([0;0;1],R_ECI)/norm(cross([0;0;1],R_ECI));

So = [R_ECI;V_ECI];

So_meters = So*1000;

end